"""
    使用you-get进行批量下载
"""
import os
import sys
import you_get
import ffmpeg
import threading
from os import *
# 下载一个视频
def download(path,url):
    msg = sys.argv = ['you-get', '--format=flv', '-o', path, url]
    # print(msg)
    you_get.main()
# 传入

def transform(path, file_format):
    stream = ffmpeg.input(path)
    path.split('.')[0]
    ffmpeg.output()




if __name__ == '__main__':
    path = 'D:\\tempVideo'
    url_list = ['https://www.bilibili.com/video/BV1yA411K7Cm?from=search&seid=13981995306107643235&spm_id_from=333.337.0.0', 'https://www.bilibili.com/video/BV17a4y1v7LT?from=search&seid=2401031371193020194&spm_id_from=333.337.0.0']
    for index in range(len(url_list)):

        download(path=path, url=url_list[index])